package com.wzf.greattruth.jvm.exception;

public class ExceptionTester {

    public static void main(String[] args) {
        ExceptionTester tester = new ExceptionTester();
        int x = tester.test();
        System.err.println(x);
        
    }

    /**
     * 不管是否抛出异常，返回结果均不会为finally中赋予的值（5）
     * 
     * @return
     */
    public int test() {
        int x ;
        // int y = 0 ;
        try {
            x = 3;
            // int z = x/y ;
            return x;
        } catch (Exception e) {
            x = 4;
            return x;
        } finally {
            x = 5;
        }
    }
}
